How to create a macro using the Visual Basic language.





Insert a module macro sheet. Start the macro with 'SUB' followed by the macro name, enter the appropriate Visual Basic code, and end the macro with 'END SUB'.

    1) Select the 'Insert' menu and select 'Macro'. (A submenu appears.)
    2) Select 'Module' from the submenu. (Excel displays a new sheet to hold the macro.)
    3) Type SUB, a space, and the macro name.
    EXAMPLE: SUB CostCaculator
    4) (Optional) Enter arguments, if any, immediately after the name.
    NOTE: Enclose the arguments within parentheses, separating arguments with a comma.
    5) Press ENTER.
    6) Enter the appropriate Visual Basic code.
    7) Type END SUB in a new line when the code is complete.
    8) Press ENTER.


Knowledge-Pak Desktop Suite (TM) Edition 5
Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved.



2nd Opinion copyright © 1997 by McAfee Associates.
Subject to the terms set forth in the end-user license agreement. All rights reserved.